<template>
  <div class="list">
    <!-- 面包屑 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>商品管理</el-breadcrumb-item>
      <el-breadcrumb-item>商品列表</el-breadcrumb-item>
    </el-breadcrumb>

    <!-- 添加商品 -->
    <el-button type="primary" plain @click="handleAddGoods">添加商品</el-button>
  </div>
</template>

<script>
export default {
  methods: {
    handleAddGoods () {
      // name或者path均可
      this.$router.push({ name: 'add', path: '/add' })
    }
  }
}
</script>
